
package sketch.ui;

import java.awt.Point;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.DefaultComboBoxModel;
import javax.swing.JCheckBox;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;

import sketch.doc.SketchContainer;
import sketch.seg.cd.CDFactory;

/**
 *
 * @author zhengwt
 */
public class SketchOption extends javax.swing.JDialog {

	/** Creates new form SketchOption */
	public SketchOption() {
		initComponents();
	}

	public JCheckBox getJCheckBoxAutoSeg() {
		if (jCheckBoxAutoSeg == null) {
			jCheckBoxAutoSeg = new javax.swing.JCheckBox();
			jCheckBoxAutoSeg.setText("Auto segmentation (all in one)");
			jCheckBoxAutoSeg.setBorder(javax.swing.BorderFactory.createEmptyBorder(
					0, 0, 0, 0));
			jCheckBoxAutoSeg.setMargin(new java.awt.Insets(0, 0, 0, 0));

		}
		return jCheckBoxAutoSeg;
	}

	public JLabel getJLabelRawInk() {
		if (jLabelRawInk == null) {
			jLabelRawInk = new javax.swing.JLabel();
			jLabelRawInk.setText("Raw ink");
		}
		return jLabelRawInk;
	}

	public JLabel getJLabelSelInk() {
		if (jLabelSelInk == null) {
			jLabelSelInk = new javax.swing.JLabel();
			jLabelSelInk.setText("Selected ink");
		}
		return jLabelSelInk;
	}

	public JLabel getJLabelCorner() {
		if (jLabelCorner == null) {
			jLabelCorner = new javax.swing.JLabel();
			jLabelCorner.setText("Corner");
		}
		return jLabelCorner;
	}

	public JComboBox getJComboBoxRawInkColor() {
		if (jComboBoxRawInkColor == null) {
			jComboBoxRawInkColor = new javax.swing.JComboBox();
			jComboBoxRawInkColor.setModel(getComboBoxModelColor());
		}
		return jComboBoxRawInkColor;
	}

//	private DefaultComboBoxModel color;

	public DefaultComboBoxModel getComboBoxModelColor() {
//		if (color == null) {
//
//		}
		return new DefaultComboBoxModel(new String[] {
				"BLUE", "RED", "BLACK"
		});
	}

	public JComboBox getJComboBoxSelInkColor() {
		if (jComboBoxSelInkColor == null) {
			jComboBoxSelInkColor = new JComboBox();
			jComboBoxSelInkColor.setModel(getComboBoxModelColor());
		}
		return jComboBoxSelInkColor;
	}

	public JComboBox getJComboBoxCornerColor() {
		if (jComboBoxCornerColor == null) {
			jComboBoxCornerColor = new JComboBox();
			jComboBoxCornerColor.setModel(getComboBoxModelColor());
		}
		return jComboBoxCornerColor;
	}

	public javax.swing.JComboBox getJComboBoxDomainSymbolColor() {
		if (jComboBoxDomainSymbolColor == null) {
			jComboBoxDomainSymbolColor = new JComboBox();
			jComboBoxDomainSymbolColor.setModel(getComboBoxModelColor());
		}
		return jComboBoxDomainSymbolColor;
	}

	public javax.swing.JComboBox getJComboBoxNormalSymbolColor() {
		if (jComboBoxNormalSymbolColor == null) {
			jComboBoxNormalSymbolColor = new javax.swing.JComboBox();
			jComboBoxNormalSymbolColor.setModel(getComboBoxModelColor());

		}
		return jComboBoxNormalSymbolColor;
	}

	public javax.swing.JComboBox getJComboBoxPrimSymbolColor() {
		if (jComboBoxPrimSymbolColor == null) {
			jComboBoxPrimSymbolColor = new JComboBox();
			jComboBoxPrimSymbolColor.setModel(getComboBoxModelColor());
		}
		return jComboBoxPrimSymbolColor;
	}

	public javax.swing.JComboBox getJComboBoxSelSymbolColor() {
		if (jComboBoxSelSymbolColor == null) {
			jComboBoxSelSymbolColor = new JComboBox();
			jComboBoxSelSymbolColor.setModel(getComboBoxModelColor());
		}
		return jComboBoxSelSymbolColor;
	}

	public javax.swing.JComboBox getJComboBoxCDMethod() {
		if (jComboBoxCDMethod == null) {
			jComboBoxCDMethod = new JComboBox();
			DefaultComboBoxModel model = new DefaultComboBoxModel(CDFactory.getTypes());
			jComboBoxCDMethod.setModel(model);
			jComboBoxCDMethod.setSelectedIndex(
					CDFactory.getTypeIndex(
							SketchContainer.get().getCD().getType()));

			jComboBoxCDMethod.addActionListener(new ActionListener() {

				public void actionPerformed(ActionEvent e) {
					String type = getJComboBoxCDMethod().getSelectedItem().toString();
					SketchContainer.get().setCD(CDFactory.getCD(type));
				}

			});
		}
		return jComboBoxCDMethod;
	}

	public javax.swing.JLabel getJLabelCDMethod() {
		if (jLabelCDMethod == null) {
			jLabelCDMethod = new JLabel();
			jLabelCDMethod.setText("Method");
		}
		return jLabelCDMethod;
	}

	public javax.swing.JLabel getJLabelDomainSymbol() {
		if (jLabelDomainSymbol == null) {
			jLabelDomainSymbol = new JLabel();
			jLabelDomainSymbol.setText("Domain symbol");
		}
		return jLabelDomainSymbol;
	}

	public javax.swing.JLabel getJLabelNormalSymbol() {
		if (jLabelNormalSymbol == null) {
			jLabelNormalSymbol = new JLabel();
			jLabelNormalSymbol.setText("Normal symbol");
		}
		return jLabelNormalSymbol;
	}

	public javax.swing.JLabel getJLabelPrimSymbol() {
		if (jLabelPrimSymbol == null) {
			jLabelPrimSymbol = new JLabel();
			jLabelPrimSymbol.setText("Primitive symbol");
		}
		return jLabelPrimSymbol;
	}

	public javax.swing.JLabel getJLabelSelSymbol() {
		if (jLabelSelSymbol == null) {
			jLabelSelSymbol = new JLabel();
			jLabelSelSymbol.setText("Selected symbol");
		}
		return jLabelSelSymbol;
	}

	public javax.swing.JPanel getJPanelParse() {
		if (jPanelParse == null) {
			jPanelParse = new JPanel();
			javax.swing.GroupLayout jPanelParseLayout = new javax.swing.GroupLayout(
					jPanelParse);
			jPanelParse.setLayout(jPanelParseLayout);
			jPanelParseLayout.setHorizontalGroup(jPanelParseLayout
					.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
					.addGap(0, 374, Short.MAX_VALUE));
			jPanelParseLayout.setVerticalGroup(jPanelParseLayout
					.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
					.addGap(0, 354, Short.MAX_VALUE));
		}
		return jPanelParse;
	}

	public javax.swing.JPanel getJPanelSeg() {
		if (jPanelSeg == null) {
			jPanelSeg = new JPanel();

			javax.swing.GroupLayout jPanelSegLayout = new javax.swing.GroupLayout(
					jPanelSeg);
			jPanelSeg.setLayout(jPanelSegLayout);
			jPanelSegLayout
					.setHorizontalGroup(jPanelSegLayout
							.createParallelGroup(
									javax.swing.GroupLayout.Alignment.LEADING)
							.addGroup(
									javax.swing.GroupLayout.Alignment.TRAILING,
									jPanelSegLayout
											.createSequentialGroup()
											.addContainerGap()
											.addGroup(
													jPanelSegLayout
															.createParallelGroup(
																	javax.swing.GroupLayout.Alignment.TRAILING)
															.addComponent(
																	getJPanelSegCD(),
																	javax.swing.GroupLayout.Alignment.LEADING,
																	javax.swing.GroupLayout.DEFAULT_SIZE,
																	javax.swing.GroupLayout.DEFAULT_SIZE,
																	Short.MAX_VALUE)
															.addComponent(
																	getJPanelSegCS(),
																	javax.swing.GroupLayout.Alignment.LEADING,
																	javax.swing.GroupLayout.DEFAULT_SIZE,
																	javax.swing.GroupLayout.DEFAULT_SIZE,
																	Short.MAX_VALUE)
															.addComponent(
																	getJPanelSegPA(),
																	javax.swing.GroupLayout.Alignment.LEADING,
																	javax.swing.GroupLayout.DEFAULT_SIZE,
																	javax.swing.GroupLayout.DEFAULT_SIZE,
																	Short.MAX_VALUE)
															.addComponent(
																	getJCheckBoxAutoSeg(),
																	javax.swing.GroupLayout.Alignment.LEADING))
											.addContainerGap()));
			jPanelSegLayout
					.setVerticalGroup(jPanelSegLayout
							.createParallelGroup(
									javax.swing.GroupLayout.Alignment.LEADING)
							.addGroup(
									jPanelSegLayout
											.createSequentialGroup()
											.addContainerGap()
											.addComponent(getJCheckBoxAutoSeg())
											.addGap(63, 63, 63)
											.addComponent(
													getJPanelSegCD(),
													javax.swing.GroupLayout.DEFAULT_SIZE,
													javax.swing.GroupLayout.DEFAULT_SIZE,
													Short.MAX_VALUE)
											.addPreferredGap(
													javax.swing.LayoutStyle.ComponentPlacement.RELATED)
											.addComponent(
													getJPanelSegCS(),
													javax.swing.GroupLayout.PREFERRED_SIZE,
													javax.swing.GroupLayout.DEFAULT_SIZE,
													javax.swing.GroupLayout.PREFERRED_SIZE)
											.addPreferredGap(
													javax.swing.LayoutStyle.ComponentPlacement.RELATED)
											.addComponent(
													getJPanelSegPA(),
													javax.swing.GroupLayout.PREFERRED_SIZE,
													javax.swing.GroupLayout.DEFAULT_SIZE,
													javax.swing.GroupLayout.PREFERRED_SIZE)
											.addContainerGap()));
		}
		return jPanelSeg;
	}

	public javax.swing.JPanel getJPanelSegCD() {
		if (jPanelSegCD == null) {
			jPanelSegCD = new JPanel();

			jPanelSegCD.setBorder(javax.swing.BorderFactory.createTitledBorder(
					javax.swing.BorderFactory.createLineBorder(new java.awt.Color(
							0, 0, 0)), "Corner Detection"));

			javax.swing.GroupLayout jPanelSegCDLayout = new javax.swing.GroupLayout(
					jPanelSegCD);
			jPanelSegCD.setLayout(jPanelSegCDLayout);
			jPanelSegCDLayout
					.setHorizontalGroup(jPanelSegCDLayout
							.createParallelGroup(
									javax.swing.GroupLayout.Alignment.LEADING)
							.addGroup(
									jPanelSegCDLayout
											.createSequentialGroup()
											.addContainerGap()
											.addComponent(getJLabelCDMethod())
											.addPreferredGap(
													javax.swing.LayoutStyle.ComponentPlacement.RELATED)
											.addComponent(getJComboBoxCDMethod(), 0,
													284, Short.MAX_VALUE)
											.addContainerGap()));
			jPanelSegCDLayout
					.setVerticalGroup(jPanelSegCDLayout
							.createParallelGroup(
									javax.swing.GroupLayout.Alignment.LEADING)
							.addGroup(
									jPanelSegCDLayout
											.createSequentialGroup()
											.addGroup(
													jPanelSegCDLayout
															.createParallelGroup(
																	javax.swing.GroupLayout.Alignment.BASELINE)
															.addComponent(
																	getJLabelCDMethod())
															.addComponent(
																	getJComboBoxCDMethod(),
																	javax.swing.GroupLayout.PREFERRED_SIZE,
																	javax.swing.GroupLayout.DEFAULT_SIZE,
																	javax.swing.GroupLayout.PREFERRED_SIZE))
											.addContainerGap(150, Short.MAX_VALUE)));
		}
		return jPanelSegCD;
	}

	public javax.swing.JPanel getJPanelSegCS() {
		if (jPanelSegCS == null) {
			jPanelSegCS = new JPanel();
			jPanelSegCS.setBorder(javax.swing.BorderFactory.createTitledBorder(
					javax.swing.BorderFactory.createLineBorder(new java.awt.Color(
							0, 0, 0)), "Curve Segmentation"));
			javax.swing.GroupLayout jPanelSegCSLayout = new javax.swing.GroupLayout(
					jPanelSegCS);
			jPanelSegCS.setLayout(jPanelSegCSLayout);
			jPanelSegCSLayout.setHorizontalGroup(jPanelSegCSLayout
					.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
					.addGap(0, 344, Short.MAX_VALUE));
			jPanelSegCSLayout.setVerticalGroup(jPanelSegCSLayout
					.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
					.addGap(0, 0, Short.MAX_VALUE));
		}
		return jPanelSegCS;
	}

	public javax.swing.JPanel getJPanelSegPA() {
		if (jPanelSegPA == null) {
			jPanelSegPA = new JPanel();
			jPanelSegPA.setBorder(javax.swing.BorderFactory.createTitledBorder(
					javax.swing.BorderFactory.createLineBorder(new java.awt.Color(
							0, 0, 0)), "Primitive Approximation"));
			javax.swing.GroupLayout jPanelSegPALayout = new javax.swing.GroupLayout(
					jPanelSegPA);
			jPanelSegPA.setLayout(jPanelSegPALayout);
			jPanelSegPALayout.setHorizontalGroup(jPanelSegPALayout
					.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
					.addGap(0, 344, Short.MAX_VALUE));
			jPanelSegPALayout.setVerticalGroup(jPanelSegPALayout
					.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
					.addGap(0, 0, Short.MAX_VALUE));
		}
		return jPanelSegPA;
	}

	public javax.swing.JPanel getJPanelView() {
		if (jPanelView == null) {
			jPanelView = new JPanel();

			javax.swing.GroupLayout jPanelViewLayout = new javax.swing.GroupLayout(
					jPanelView);
			jPanelView.setLayout(jPanelViewLayout);
			jPanelViewLayout
					.setHorizontalGroup(jPanelViewLayout
							.createParallelGroup(
									javax.swing.GroupLayout.Alignment.LEADING)
							.addGroup(
									javax.swing.GroupLayout.Alignment.TRAILING,
									jPanelViewLayout
											.createSequentialGroup()
											.addContainerGap()
											.addGroup(
													jPanelViewLayout
															.createParallelGroup(
																	javax.swing.GroupLayout.Alignment.TRAILING)
															.addComponent(
																	getJPanelViewCxt(),
																	javax.swing.GroupLayout.Alignment.LEADING,
																	javax.swing.GroupLayout.DEFAULT_SIZE,
																	javax.swing.GroupLayout.DEFAULT_SIZE,
																	Short.MAX_VALUE)
															.addComponent(
																	getJPanelViewInk(),
																	javax.swing.GroupLayout.Alignment.LEADING,
																	javax.swing.GroupLayout.DEFAULT_SIZE,
																	javax.swing.GroupLayout.DEFAULT_SIZE,
																	Short.MAX_VALUE))
											.addContainerGap()));
			jPanelViewLayout
					.setVerticalGroup(jPanelViewLayout
							.createParallelGroup(
									javax.swing.GroupLayout.Alignment.LEADING)
							.addGroup(
									jPanelViewLayout
											.createSequentialGroup()
											.addContainerGap()
											.addComponent(
													getJPanelViewInk(),
													javax.swing.GroupLayout.PREFERRED_SIZE,
													javax.swing.GroupLayout.DEFAULT_SIZE,
													javax.swing.GroupLayout.PREFERRED_SIZE)
											.addPreferredGap(
													javax.swing.LayoutStyle.ComponentPlacement.RELATED)
											.addComponent(
													getJPanelViewCxt(),
													javax.swing.GroupLayout.DEFAULT_SIZE,
													javax.swing.GroupLayout.DEFAULT_SIZE,
													Short.MAX_VALUE)
											.addContainerGap()));
		}
		return jPanelView;
	}

	public javax.swing.JPanel getJPanelViewCxt() {
		if (jPanelViewCxt == null) {
			jPanelViewCxt = new JPanel();

			jPanelViewCxt.setBorder(javax.swing.BorderFactory.createTitledBorder(
					javax.swing.BorderFactory.createLineBorder(new java.awt.Color(
							0, 0, 0)), "Context Color"));

			javax.swing.GroupLayout jPanelViewCxtLayout = new javax.swing.GroupLayout(
					jPanelViewCxt);
			jPanelViewCxt.setLayout(jPanelViewCxtLayout);
			jPanelViewCxtLayout
					.setHorizontalGroup(jPanelViewCxtLayout
							.createParallelGroup(
									javax.swing.GroupLayout.Alignment.LEADING)
							.addGroup(
									jPanelViewCxtLayout
											.createSequentialGroup()
											.addContainerGap()
											.addGroup(
													jPanelViewCxtLayout
															.createParallelGroup(
																	javax.swing.GroupLayout.Alignment.LEADING)
															.addComponent(
																	getJLabelNormalSymbol(),
																	javax.swing.GroupLayout.Alignment.TRAILING)
															.addComponent(
																	getJLabelSelSymbol(),
																	javax.swing.GroupLayout.Alignment.TRAILING)
															.addComponent(
																	getJLabelDomainSymbol(),
																	javax.swing.GroupLayout.Alignment.TRAILING)
															.addComponent(
																	getJLabelPrimSymbol(),
																	javax.swing.GroupLayout.Alignment.TRAILING))
											.addPreferredGap(
													javax.swing.LayoutStyle.ComponentPlacement.RELATED)
											.addGroup(
													jPanelViewCxtLayout
															.createParallelGroup(
																	javax.swing.GroupLayout.Alignment.LEADING)
															.addComponent(
																	getJComboBoxNormalSymbolColor(),
																	0, 243,
																	Short.MAX_VALUE)
															.addComponent(
																	getJComboBoxSelSymbolColor(),
																	0, 243,
																	Short.MAX_VALUE)
															.addComponent(
																	getJComboBoxDomainSymbolColor(),
																	0, 243,
																	Short.MAX_VALUE)
															.addComponent(
																	getJComboBoxPrimSymbolColor(),
																	0, 243,
																	Short.MAX_VALUE))
											.addContainerGap()));
			jPanelViewCxtLayout
					.setVerticalGroup(jPanelViewCxtLayout
							.createParallelGroup(
									javax.swing.GroupLayout.Alignment.LEADING)
							.addGroup(
									jPanelViewCxtLayout
											.createSequentialGroup()
											.addGroup(
													jPanelViewCxtLayout
															.createParallelGroup(
																	javax.swing.GroupLayout.Alignment.BASELINE)
															.addComponent(
																	getJLabelNormalSymbol())
															.addComponent(
																	getJComboBoxNormalSymbolColor(),
																	javax.swing.GroupLayout.PREFERRED_SIZE,
																	javax.swing.GroupLayout.DEFAULT_SIZE,
																	javax.swing.GroupLayout.PREFERRED_SIZE))
											.addPreferredGap(
													javax.swing.LayoutStyle.ComponentPlacement.RELATED)
											.addGroup(
													jPanelViewCxtLayout
															.createParallelGroup(
																	javax.swing.GroupLayout.Alignment.BASELINE)
															.addComponent(
																	getJLabelSelSymbol())
															.addComponent(
																	getJComboBoxSelSymbolColor(),
																	javax.swing.GroupLayout.PREFERRED_SIZE,
																	javax.swing.GroupLayout.DEFAULT_SIZE,
																	javax.swing.GroupLayout.PREFERRED_SIZE))
											.addPreferredGap(
													javax.swing.LayoutStyle.ComponentPlacement.RELATED)
											.addGroup(
													jPanelViewCxtLayout
															.createParallelGroup(
																	javax.swing.GroupLayout.Alignment.BASELINE)
															.addComponent(
																	getJLabelDomainSymbol())
															.addComponent(
																	getJComboBoxDomainSymbolColor(),
																	javax.swing.GroupLayout.PREFERRED_SIZE,
																	javax.swing.GroupLayout.DEFAULT_SIZE,
																	javax.swing.GroupLayout.PREFERRED_SIZE))
											.addPreferredGap(
													javax.swing.LayoutStyle.ComponentPlacement.RELATED)
											.addGroup(
													jPanelViewCxtLayout
															.createParallelGroup(
																	javax.swing.GroupLayout.Alignment.BASELINE)
															.addComponent(
																	getJLabelPrimSymbol())
															.addComponent(
																	getJComboBoxPrimSymbolColor(),
																	javax.swing.GroupLayout.PREFERRED_SIZE,
																	javax.swing.GroupLayout.DEFAULT_SIZE,
																	javax.swing.GroupLayout.PREFERRED_SIZE))
											.addContainerGap(79, Short.MAX_VALUE)));
		}
		return jPanelViewCxt;
	}

	public javax.swing.JPanel getJPanelViewInk() {
		if (jPanelViewInk == null) {
			jPanelViewInk = new JPanel();
			jPanelViewInk.setBorder(javax.swing.BorderFactory.createTitledBorder(
					javax.swing.BorderFactory.createLineBorder(new java.awt.Color(
							0, 0, 0)), "Ink Color"));

			javax.swing.GroupLayout jPanelViewInkLayout = new javax.swing.GroupLayout(
					jPanelViewInk);
			jPanelViewInk.setLayout(jPanelViewInkLayout);
			jPanelViewInkLayout
					.setHorizontalGroup(jPanelViewInkLayout
							.createParallelGroup(
									javax.swing.GroupLayout.Alignment.LEADING)
							.addGroup(
									jPanelViewInkLayout
											.createSequentialGroup()
											.addContainerGap()
											.addGroup(
													jPanelViewInkLayout
															.createParallelGroup(
																	javax.swing.GroupLayout.Alignment.LEADING)
															.addComponent(
																	getJLabelRawInk(),
																	javax.swing.GroupLayout.Alignment.TRAILING)
															.addComponent(
																	getJLabelSelInk(),
																	javax.swing.GroupLayout.Alignment.TRAILING)
															.addComponent(
																	getJLabelCorner(),
																	javax.swing.GroupLayout.Alignment.TRAILING))
											.addPreferredGap(
													javax.swing.LayoutStyle.ComponentPlacement.RELATED)
											.addGroup(
													jPanelViewInkLayout
															.createParallelGroup(
																	javax.swing.GroupLayout.Alignment.LEADING)
															.addGroup(
																	jPanelViewInkLayout
																			.createSequentialGroup()
																			.addComponent(
																					getJComboBoxRawInkColor(),
																					0,
																					263,
																					Short.MAX_VALUE)
																			.addPreferredGap(
																					javax.swing.LayoutStyle.ComponentPlacement.RELATED))
															.addComponent(
																	getJComboBoxSelInkColor(),
																	0, 263,
																	Short.MAX_VALUE)
															.addComponent(
																	getJComboBoxCornerColor(),
																	0, 263,
																	Short.MAX_VALUE))
											.addContainerGap()));
			jPanelViewInkLayout
					.setVerticalGroup(jPanelViewInkLayout
							.createParallelGroup(
									javax.swing.GroupLayout.Alignment.LEADING)
							.addGroup(
									jPanelViewInkLayout
											.createSequentialGroup()
											.addGroup(
													jPanelViewInkLayout
															.createParallelGroup(
																	javax.swing.GroupLayout.Alignment.BASELINE)
															.addComponent(
																	getJLabelRawInk())
															.addComponent(
																	getJComboBoxRawInkColor(),
																	javax.swing.GroupLayout.PREFERRED_SIZE,
																	javax.swing.GroupLayout.DEFAULT_SIZE,
																	javax.swing.GroupLayout.PREFERRED_SIZE))
											.addPreferredGap(
													javax.swing.LayoutStyle.ComponentPlacement.RELATED)
											.addGroup(
													jPanelViewInkLayout
															.createParallelGroup(
																	javax.swing.GroupLayout.Alignment.BASELINE)
															.addComponent(
																	getJLabelSelInk())
															.addComponent(
																	getJComboBoxSelInkColor(),
																	javax.swing.GroupLayout.PREFERRED_SIZE,
																	javax.swing.GroupLayout.DEFAULT_SIZE,
																	javax.swing.GroupLayout.PREFERRED_SIZE))
											.addPreferredGap(
													javax.swing.LayoutStyle.ComponentPlacement.RELATED)
											.addGroup(
													jPanelViewInkLayout
															.createParallelGroup(
																	javax.swing.GroupLayout.Alignment.BASELINE)
															.addComponent(
																	getJLabelCorner())
															.addComponent(
																	getJComboBoxCornerColor(),
																	javax.swing.GroupLayout.PREFERRED_SIZE,
																	javax.swing.GroupLayout.DEFAULT_SIZE,
																	javax.swing.GroupLayout.PREFERRED_SIZE))
											.addContainerGap(83, Short.MAX_VALUE)));
		}
		return jPanelViewInk;
	}

	public javax.swing.JTabbedPane getJTabbedPane() {
		if (jTabbedPane == null) {
			jTabbedPane = new JTabbedPane();

//TODO
			jTabbedPane.addTab("Segmentation", getJPanelSeg());
			jTabbedPane.addTab("Parsing", getJPanelParse());
			jTabbedPane.addTab("View", getJPanelView());
		}
		return jTabbedPane;
	}

	private void initComponents() {

		setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
		setResizable(false);
		setTitle("Option");
		setModal(true);
		Point p = getParent().getLocation();
		setLocation(p.x + 150, p.y + 50);

		javax.swing.GroupLayout layout = new javax.swing.GroupLayout(
				getContentPane());
		getContentPane().setLayout(layout);
		layout.setHorizontalGroup(layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addGroup(
				layout.createSequentialGroup().addContainerGap().addComponent(
						getJTabbedPane(), javax.swing.GroupLayout.DEFAULT_SIZE, 379,
						Short.MAX_VALUE).addContainerGap()));
		layout.setVerticalGroup(layout.createParallelGroup(
				javax.swing.GroupLayout.Alignment.LEADING).addGroup(
				layout.createSequentialGroup().addContainerGap().addComponent(
						getJTabbedPane(), javax.swing.GroupLayout.DEFAULT_SIZE, 436,
						Short.MAX_VALUE).addContainerGap()));
		pack();
	}// </editor-fold>

	/**
	 * @param args
	 *            the command line arguments
	 */
	public static void main(String args[]) {
		java.awt.EventQueue.invokeLater(new Runnable() {
			public void run() {
				new SketchOption().setVisible(true);
			}
		});
	}

	// Variables declaration - do not modify
	private javax.swing.JCheckBox jCheckBoxAutoSeg;
	private javax.swing.JComboBox jComboBoxCDMethod;
	private javax.swing.JComboBox jComboBoxCornerColor;
	private javax.swing.JComboBox jComboBoxDomainSymbolColor;
	private javax.swing.JComboBox jComboBoxNormalSymbolColor;
	private javax.swing.JComboBox jComboBoxPrimSymbolColor;
	private javax.swing.JComboBox jComboBoxRawInkColor;
	private javax.swing.JComboBox jComboBoxSelInkColor;
	private javax.swing.JComboBox jComboBoxSelSymbolColor;
	private javax.swing.JLabel jLabelCDMethod;
	private javax.swing.JLabel jLabelCorner;
	private javax.swing.JLabel jLabelDomainSymbol;
	private javax.swing.JLabel jLabelNormalSymbol;
	private javax.swing.JLabel jLabelPrimSymbol;
	private javax.swing.JLabel jLabelRawInk;
	private javax.swing.JLabel jLabelSelInk;
	private javax.swing.JLabel jLabelSelSymbol;
	private javax.swing.JPanel jPanelParse;
	private javax.swing.JPanel jPanelSeg;
	private javax.swing.JPanel jPanelSegCD;
	private javax.swing.JPanel jPanelSegCS;
	private javax.swing.JPanel jPanelSegPA;
	private javax.swing.JPanel jPanelView;
	private javax.swing.JPanel jPanelViewCxt;
	private javax.swing.JPanel jPanelViewInk;
	private javax.swing.JTabbedPane jTabbedPane;
	// End of variables declaration



}
